package communication;

import java.io.*;
import java.util.Scanner;

@SuppressWarnings("all")
public class SendThread implements Runnable {
    private DataOutputStream dOut;
    public SendThread(DataOutputStream dOut){
        this.dOut = dOut;
    }
    @Override
    public void run() {
        while(true){
            byte[] bytes = null;
            ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
            ObjectOutputStream objectOutputStream = null;
                try {
                    String s = new Scanner(System.in).nextLine();
                    dOut.write(s.getBytes("UTF-8"));
                } catch (IOException e) {
                    break;
                } catch (Exception e) {
                    e.printStackTrace();
                }
        }
    }

}